//SSAOBlurFX.h
//Created 06/08/13
//Created By Daniel Bowler
//
//The final effect in the trio - we apply an edge presering blur to our
//SSAOMap to reduce the noise issues. 

#pragma once

#include "AbstractFX.h"

class SSAOBlurFX : public AbstractFX
{
	//Shader manager will create an instance of this fx, like all other effects
	friend ShaderManager;
public:
	struct SSAOBlurVertex
	{
		XMFLOAT3 PosL;
		XMFLOAT2 Tex;
	};

	//Set input for this pass.
	void SetShaderResources(ID3D11ShaderResourceView* input, 
		ID3D11ShaderResourceView* viewSpaceNormalDepthMap);

	//Set texel height/width for this frame
	void SetCBufferTexelData(float width, float height);
private:
	//Constructor/Desturcotr
	SSAOBlurFX(ID3D11Device* device);
	~SSAOBlurFX();
	//Disable assignment operator and copy constrcutor.
	SSAOBlurFX(SSAOBlurFX& other);
	SSAOBlurFX& operator=(SSAOBlurFX& other);

	//Override the init methods.
	void InitInputLayout(ID3D11Device* device);
	void InitShaderVariablePointers();

private:
	//Shader variables/textures/cbuffers etc.
	
	//CBuffer - texel data.
	ID3DX11EffectScalarVariable* texelWidthVar;
	ID3DX11EffectScalarVariable* texelHeightVar;

	//Input Texture.
	ID3DX11EffectShaderResourceVariable* inputTexVar;
	//Input view space normal depth map
	ID3DX11EffectShaderResourceVariable* viewSpaceNormalDepthVar;
};